$(function (){
    $('#btn-file-upload').on('click', function (){
        if ($('input#file').val() == '')
        {
            console.log('empty file');
            return false;
        }
        $('#file-upload').attr('src', '/index/file');
        $('#form-file').submit();
    });
})